home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 145 / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin / games / spassion / source.lzh / SOURCE / FuncEnemy / BOSS01.C < prev    next >
Text File  |  2000-03-27  |  19KB  |  557 lines

  1. /*
  2. #include <stdio.h>
  3. #include <iocslib.h>
  4. */
  5. /* 腕を広げてレーザーとか */
  6. #include <xsp2lib.h>
  7. #include "../SPASSION.H"
  8. #include "../player.h"
  9. #include "../enemy.h"
  10. #include "../eshot.h"
  11. #include "../effect.h"
  12. #include "../priority.h"
  13. #include "../sound.h"
  14. #include "../entry.h"
  15. #include "../SUB.H"
  16. #ifndef NULL
  17. #define NULL ((void *) 0)
  18. #endif
  19.  
  20. #define PALET_MAIN    0x0700
  21. #define P_X    (*((short *) (&player[0].lx)))    /*lxの上位ワード*/
  22. #define P_Y    (*((short *) (&player[0].ly)))    /*lyの上位ワード*/
  23.  
  24. static short MoveEnemyBoss01(ENEMY *);
  25. /*static void TiniEnemyBoss01(ENEMY *);*/
  26. static short MoveEnemyCore1( ENEMY *ene );
  27. static short MoveEnemyCore2( ENEMY *ene );
  28. static short MoveEnemyCore4( ENEMY *ene );
  29. static short MoveEnemyShield( ENEMY *ene );
  30.  
  31. /* 中心の細い棒のところ*/
  32. static HIT_XY4    hit0_0_p={ -40-PLAYER_HIT_X, - 1-PLAYER_HIT_Y,   0+PLAYER_HIT_X,   1+PLAYER_HIT_Y};
  33.  
  34. /* 中心部分の芯のところ*/
  35. static HIT_XY4    hit0_1_p={ -16-PLAYER_HIT_X, -16-PLAYER_HIT_Y,  32+PLAYER_HIT_X,  16+PLAYER_HIT_Y};
  36.  
  37. /* 中心部分の後ろ */
  38. static HIT_XY4    hit0_2_p={  32-PLAYER_HIT_X, - 6-PLAYER_HIT_Y,  42+PLAYER_HIT_X,   6+PLAYER_HIT_Y};
  39.  
  40. /* 外枠の内側(上側) */
  41. static HIT_XY4    hit1_0_p[5]={ -28-PLAYER_HIT_X, -24-PLAYER_HIT_Y,  40+PLAYER_HIT_X, -18+PLAYER_HIT_Y,};
  42. static HIT_XY4    hit1_0_s[5]={ -28, -24,  40, -18,};
  43.  
  44. /* 外枠の外側(上側) */
  45. static HIT_XY4    hit1_1_p[5]={ -12-PLAYER_HIT_X, -30-PLAYER_HIT_Y,  16+PLAYER_HIT_X, -23+PLAYER_HIT_Y,};
  46. static HIT_XY4    hit1_1_s[5]={ -12, -30,  16, -23,};
  47.  
  48. /* 外枠の内側(下側) */
  49. static HIT_XY4    hit2_0_p[5];
  50. static HIT_XY4    hit2_0_s[5];
  51. /* 外枠の外側(下側) */
  52. static HIT_XY4    hit2_1_p[5];
  53. static HIT_XY4    hit2_1_s[5];
  54. HIT_XY4    nohit={999,999,999,999};
  55. HIT_XY4    hit_core_p={-5-PLAYER_HIT_X,-5-PLAYER_HIT_Y,5+PLAYER_HIT_X,5+PLAYER_HIT_Y};
  56. HIT_XY4    hit_core_o={-5-OPTION_HIT_X,-5-OPTION_HIT_Y,5+OPTION_HIT_X,5+OPTION_HIT_Y};
  57. HIT_XY4    hit_core_s={-5,-5,5,5};
  58. HIT_XY4    hit_shield0_p[5];
  59. HIT_XY4    hit_shield0_o[5];
  60. HIT_XY4    hit_shield0_s[5]={-8,-3,8,3, -5,-3,8,3, -2,-3,8,3,  1,-3,8,3,  4,-3,8,3 };
  61. HIT_XY4    hit_shield1_p[5];
  62. HIT_XY4    hit_shield1_o[5];
  63. HIT_XY4    hit_shield1_s[5]={-8,-3,8,3, -8,-3,5,3, -8,-3,2,3, -8,-3,-1,3, -8,-3,-4,3 };
  64.  
  65. static unsigned char seed=0;
  66.  
  67. /* 当たり判定の初期化 */
  68. void InitEnemyBoss01Hit( void )
  69. {
  70.     short    i;
  71.     for(i=1;i<5;i++){
  72.         hit1_0_p[i].x1=hit1_0_p[0].x1;hit1_0_p[i].y1=hit1_0_p[0].y1-i*4;hit1_0_p[i].x2=hit1_0_p[0].x2;hit1_0_p[i].y2=hit1_0_p[0].y2-i*4;
  73.         hit1_0_s[i].x1=hit1_0_s[0].x1;hit1_0_s[i].y1=hit1_0_s[0].y1-i*4;hit1_0_s[i].x2=hit1_0_s[0].x2;hit1_0_s[i].y2=hit1_0_s[0].y2-i*4;
  74.         hit1_1_p[i].x1=hit1_1_p[0].x1;hit1_1_p[i].y1=hit1_1_p[0].y1-i*4;hit1_1_p[i].x2=hit1_1_p[0].x2;hit1_1_p[i].y2=hit1_1_p[0].y2-i*4;
  75.         hit1_1_s[i].x1=hit1_1_s[0].x1;hit1_1_s[i].y1=hit1_1_s[0].y1-i*4;hit1_1_s[i].x2=hit1_1_s[0].x2;hit1_1_s[i].y2=hit1_1_s[0].y2-i*4;
  76.     }
  77.  
  78.     for(i=0;i<5;i++){
  79.         hit2_0_p[i].x1=hit1_0_p[i].x1;hit2_0_p[i].y1=(hit1_0_p[i].y2*-1);hit2_0_p[i].x2=hit1_0_p[i].x2;hit2_0_p[i].y2=(hit1_0_p[i].y1*-1);
  80.         hit2_0_s[i].x1=hit1_0_s[i].x1;hit2_0_s[i].y1=(hit1_0_s[i].y2*-1);hit2_0_s[i].x2=hit1_0_s[i].x2;hit2_0_s[i].y2=(hit1_0_s[i].y1*-1);
  81.         hit2_1_p[i].x1=hit1_1_p[i].x1;hit2_1_p[i].y1=(hit1_1_p[i].y2*-1);hit2_1_p[i].x2=hit1_1_p[i].x2;hit2_1_p[i].y2=(hit1_1_p[i].y1*-1);
  82.         hit2_1_s[i].x1=hit1_1_s[i].x1;hit2_1_s[i].y1=(hit1_1_s[i].y2*-1);hit2_1_s[i].x2=hit1_1_s[i].x2;hit2_1_s[i].y2=(hit1_1_s[i].y1*-1);
  83.     }
  84. }
  85. void InitEnemyCoreHit( void )
  86. {
  87. }
  88. void InitEnemyShieldHit( void )
  89. {
  90.     short    i;
  91.     for(i=0;i<5;i++){
  92.         hit_shield0_p[i].x1=hit_shield0_s[i].x1-PLAYER_HIT_X;hit_shield0_p[i].x2=hit_shield0_s[i].x2+PLAYER_HIT_X;
  93.         hit_shield0_p[i].y1=hit_shield0_s[i].y1-PLAYER_HIT_Y;hit_shield0_p[i].y2=hit_shield0_s[i].y2+PLAYER_HIT_Y;
  94.         hit_shield0_o[i].x1=hit_shield0_s[i].x1-OPTION_HIT_X;hit_shield0_o[i].x2=hit_shield0_s[i].x2+OPTION_HIT_X;
  95.         hit_shield0_o[i].y1=hit_shield0_s[i].y1-OPTION_HIT_Y;hit_shield0_o[i].y2=hit_shield0_s[i].y2+OPTION_HIT_Y;
  96.  
  97.         hit_shield1_p[i].x1=hit_shield1_s[i].x1-PLAYER_HIT_X;hit_shield1_p[i].x2=hit_shield1_s[i].x2+PLAYER_HIT_X;
  98.         hit_shield1_p[i].y1=hit_shield1_s[i].y1-PLAYER_HIT_Y;hit_shield1_p[i].y2=hit_shield1_s[i].y2+PLAYER_HIT_Y;
  99.         hit_shield1_o[i].x1=hit_shield1_s[i].x1-OPTION_HIT_X;hit_shield1_o[i].x2=hit_shield1_s[i].x2+OPTION_HIT_X;
  100.         hit_shield1_o[i].y1=hit_shield1_s[i].y1-OPTION_HIT_Y;hit_shield1_o[i].y2=hit_shield1_s[i].y2+OPTION_HIT_Y;
  101.     }
  102. }
  103.  
  104. void InitEnemyBoss01(ENEMY *ene)
  105. {
  106.     ene->vx             = -1 * 65536;
  107.     ene->vy             = 0;
  108.     ene->hit_p[0]     = &hit0_0_p; ene->hit_p[1] = &hit0_1_p; ene->hit_p[2] = &hit0_2_p;
  109.     ene->hit_p[3]     = &hit1_0_p[0]; ene->hit_p[4] = &hit1_1_p[0];
  110.     ene->hit_p[5]     = &hit2_0_p[0]; ene->hit_p[6] = &hit2_1_p[0];
  111.     ene->hit_p[7]     = NULL;
  112.     ene->hit_o[0]     = &nohit; ene->hit_o[1] = &nohit; ene->hit_o[2] = &nohit;
  113.     ene->hit_o[3]     = &nohit; ene->hit_o[4] = &nohit;
  114.     ene->hit_o[5]     = &nohit; ene->hit_o[6] = &nohit;
  115.     ene->hit_o[7]     = NULL;
  116.     ene->hit_s[0]     = &nohit; ene->hit_s[1] = &nohit; ene->hit_s[2] = &nohit;
  117.     ene->hit_s[3]     = &hit1_0_s[0]; ene->hit_s[4] = &hit1_1_s[0];
  118.     ene->hit_s[5]     = &hit2_0_s[0]; ene->hit_s[6] = &hit2_1_s[0];
  119.     ene->hit_s[7]     = NULL;
  120.     ene->pt             = obj_boss1;
  121.     ene->info         = PALET_MAIN | PRIORITY_BOSS;
  122.     ene->work         = 0;
  123.     ene->no_dead     = 0;
  124.     ene->func_enemy_move = MoveEnemyBoss01;
  125. /*    ene->func_enemy_tini = TiniEnemyBoss01;*/
  126. /*
  127.     ene->parts1=MakeEnemy(ENEMY_CORE , ene->x  , ene->y- 8,0,  ene);ene->parts1->child=MakeEnemy(ENEMY_SHIELD , ene->parts1->x+8, ene->parts1->y,ene->parts1->arg,  ene->parts1);
  128.     ene->parts2=MakeEnemy(ENEMY_CORE , ene->x+8, ene->y   ,1,  ene);ene->parts2->child=MakeEnemy(ENEMY_SHIELD , ene->parts2->x-8, ene->parts2->y,ene->parts2->arg,  ene->parts2);
  129.     ene->parts3=MakeEnemy(ENEMY_CORE , ene->x  , ene->y -8,0,  ene);ene->parts3->child=MakeEnemy(ENEMY_SHIELD , ene->parts3->x+8, ene->parts3->y,ene->parts3->arg,  ene->parts3);
  130. */
  131.     ene->parts1=MakeEnemy(ENEMY_CORE , ene->x  , ene->y- 8,0,  ene);ene->parts1->child=MakeEnemy(ENEMY_SHIELD , ene->parts1->x+8, ene->parts1->y,0,  ene->parts1);
  132.     ene->parts2=MakeEnemy(ENEMY_CORE , ene->x+8, ene->y   ,0,  ene);ene->parts2->child=MakeEnemy(ENEMY_SHIELD , ene->parts2->x-8, ene->parts2->y,1,  ene->parts2);
  133.     ene->parts3=MakeEnemy(ENEMY_CORE , ene->x  , ene->y -8,0,  ene);ene->parts3->child=MakeEnemy(ENEMY_SHIELD , ene->parts3->x+8, ene->parts3->y,0,  ene->parts3);
  134.     entry_counter_stop = !0;        /* エントリーカウンター停止 */
  135. }
  136.  
  137. /* コア */
  138. void InitEnemyCore(ENEMY *ene)
  139. {
  140. #if 0
  141.     typedef short (*func_enemy_move) (struct ENEMY *);
  142.     func_enemy_move FuncEnemyMove[]=
  143.     {
  144.         MoveEnemyCore1,        /* 1面ボス用 */
  145.         MoveEnemyCore2,        /* 2面ボス用 */
  146.         MoveEnemyCore4,        /* 4面ボス用 */
  147.     };
  148. #endif
  149.     ene->hit_p[0]     = &hit_core_p;ene->hit_p[1]=NULL;
  150.     ene->hit_o[0]     = &hit_core_o;ene->hit_o[1]=NULL;
  151.     ene->hit_s[0]     = &hit_core_s;ene->hit_s[1]=NULL;
  152.     ene->hp             = 200;
  153.     ene->pt             = obj_obj;
  154.     ene->info         = PALET_MAIN | PRIORITY_BOSS_PARTS;
  155.     ene->no_dead     = 0;
  156. /*    ene->func_enemy_move = MoveEnemyCore;*/
  157. /*    ene->func_enemy_move = FuncEnemyMove[ene->arg](ene);*/
  158.     switch( ene->arg ){
  159.     case 0:
  160.         ene->func_enemy_move = MoveEnemyCore1;
  161.         break;
  162.     case 1:
  163.         ene->func_enemy_move = MoveEnemyCore2;
  164.         break;
  165.     case 2:
  166.         ene->func_enemy_move = MoveEnemyCore4;
  167.         break;
  168.     }
  169.  
  170. /*    ene->func_enemy_tini = TiniEnemyCore;*/
  171. }
  172.  
  173. /* 遮蔽版 */
  174. void InitEnemyShield(ENEMY *ene)
  175. {
  176.     HIT_XY4    *hit_p[2]={hit_shield0_p,hit_shield1_p};
  177.     HIT_XY4    *hit_o[2]={hit_shield0_o,hit_shield1_o};
  178.     HIT_XY4    *hit_s[2]={hit_shield0_s,hit_shield1_s};
  179.     short    info[2]={0x0000, 0x4000};
  180.     ene->hit_p[0] = hit_p[ene->arg];ene->hit_p[1]=NULL;
  181.     ene->hit_o[0] = hit_o[ene->arg];ene->hit_p[1]=NULL;
  182.     ene->hit_s[0] = hit_s[ene->arg];ene->hit_p[1]=NULL;
  183.     ene->hp             = 200;
  184.     ene->pt             = obj_obj+5;
  185.     ene->info         = PALET_MAIN | PRIORITY_BOSS_PARTS | info[ene->arg];
  186.     ene->work         = 0;
  187.     ene->no_dead     = 0;
  188.     ene->func_enemy_move = MoveEnemyShield;
  189. /*    ene->func_enemy_tini = TiniEnemyShield;*/
  190. }
  191.  
  192. short Wait( ENEMY *ene, short time )
  193. {
  194.     if( ene->count++ > time ){
  195.         ene->count=0;
  196.         return 1;
  197.     }
  198.     return 0;
  199. }
  200.  
  201. static short MoveEnemyBoss01( ENEMY *ene )
  202. {
  203.     unsigned char angle;
  204.     short    anim_num;
  205.  
  206.     /* 爆発 */
  207.     if( ene->dead_count ){
  208.         ene->dead_count++;
  209.         if( ene->y > 256+48+16 ){
  210.             ene->child_death=1;
  211.             if(!ene->parent){
  212.                 entry_counter_stop = 0;    /* エントリーカウンター停止解除 */
  213.                 return (0);        /* 消去 */
  214.             }else{                        /* ラスボスに呼び出された場合は解除しない */
  215.                 if( ene->child_kill )
  216.                     return (0);        /* 消去 */
  217.             }
  218.         }else{
  219.             if( !(ene->dead_count%20) ){
  220.                 short    exp_x,exp_y,x,y;
  221.                 exp_x=rndtable[seed++]&31;seed&=255;
  222.                 exp_y=rndtable[seed++]&31;seed&=255;
  223.                 if( rndtable[seed++]>128 ){exp_x*=-1;exp_y*=-1;seed&=255;}
  224.                 MakeEffect(EFFECT_EXPL, 0, (x=ene->x+exp_x-8), (y=ene->y+exp_y-8));
  225.                 MakeEffect(EFFECT_HAHENMINI, 0, x, y);
  226.                 SetSE(SE_EXPL_MBOSS);    /* 爆発音 */
  227.                 if( !(ene->dead_count%70) ){
  228.                     MakeEffect(EFFECT_EXPLL, 0, ene->x, ene->y);
  229.                         MakeEffect(EFFECT_HAHEN, 0, ene->x, ene->y);
  230. /*                        MakeEffect(EFFECT_HAHENMINI, 0, ene->x, ene->y);*/
  231.                     SetSE(SE_EXPL_BOSS);    /* 爆発音 */
  232.                 }
  233.             }
  234.             ene->y = (ene->ly += 65536/2) >> 16;
  235.             xobj_set_st(ene);
  236.             return (1);
  237.         }
  238.     }
  239.  
  240.     /* 速度を足して上位ワード(固定整数部)だけ取り出す */
  241.     ene->x = (ene->lx += ene->vx) >> 16;
  242.     ene->y = (ene->ly += ene->vy) >> 16;
  243.  
  244.     ene->parts1->x=((ene->parts1->lx=ene->lx+ 4*65536)>>16)-8;
  245.     ene->parts1->y=((ene->parts1->ly=ene->ly- 8*65536)>>16)-8;
  246.     ene->parts2->x=((ene->parts2->lx=ene->lx+12*65536)>>16)-8;
  247.     ene->parts2->y=((ene->parts2->ly=ene->ly         )>>16)-8;
  248.     ene->parts3->x=((ene->parts3->lx=ene->lx+ 4*65536)>>16)-8;
  249.     ene->parts3->y=((ene->parts3->ly=ene->ly+ 8*65536)>>16)-8;
  250.  
  251.     ene->parts1->child->x=((ene->parts1->child->lx=ene->parts1->lx-12*65536)>>16)-8;    /*-8は表示位置をずらすため*/
  252.     ene->parts1->child->y=((ene->parts1->child->ly=ene->parts1->ly         )>>16)-8;
  253.     ene->parts2->child->x=((ene->parts2->child->lx=ene->parts2->lx+12*65536)>>16)-8;    /*-8は表示位置をずらすため*/
  254.     ene->parts2->child->y=((ene->parts2->child->ly=ene->parts2->ly         )>>16)-8;
  255.     ene->parts3->child->x=((ene->parts3->child->lx=ene->parts3->lx-12*65536)>>16)-8;    /*-8は表示位置をずらすため*/
  256.     ene->parts3->child->y=((ene->parts3->child->ly=ene->parts3->ly         )>>16)-8;
  257. /*    printf("shi1 x=%d y=%d   \n",ene->parts1->child->x,ene->parts1->child->y);
  258.     printf("shi2 x=%d y=%d   \n",ene->parts2->child->x,ene->parts2->child->y);
  259.     printf("shi3 x=%d y=%d   \n",ene->parts3->child->x,ene->parts3->child->y);
  260. */
  261.     switch (ene->work){
  262.     case 0:
  263.         if( ENE_X < 192 ){
  264.             ene->vx = 0;
  265.             ene->work++;
  266.         }
  267.         break;
  268.     case 1:
  269.         if( Wait( ene, 20 ) ){
  270.             if( ENE_Y < player[0].y )        /* プレイヤーの方に移動 */
  271.                 ene->vy= 2*65536;
  272.             else
  273.                 ene->vy=-2*65536;
  274.             ene->work++;
  275.         }
  276.         break;
  277.     case 2:
  278.         if( (ene->vy<0 && ENE_Y < 64 + 16) || (ene->vy>0 && ENE_Y > 192 + 16) )
  279.             ene->vy = 0;
  280.         if( Wait( ene, 40 ) ){
  281.             ene->vy=0;
  282.             ene->work++;
  283.         }
  284.         break;
  285.     case 3:        /* 時間稼ぎ */
  286.         if( Wait( ene, 20 ) )ene->work++;
  287.         break;
  288.     case 4:        /* 腕を広げる */
  289.         anim_num=(++ene->anim_count)/4;
  290.         ene->pt = obj_boss1+anim_num;
  291.         if( !ene->parts1->child_death )ene->parts1->pt=obj_obj+anim_num;
  292.         if( !ene->parts2->child_death )ene->parts2->pt=obj_obj+anim_num;
  293.         if( !ene->parts3->child_death )ene->parts3->pt=obj_obj+anim_num;
  294.         ene->hit_p[3] = &hit1_0_p[anim_num]; ene->hit_p[4] = &hit1_1_p[anim_num];
  295.         ene->hit_p[5] = &hit2_0_p[anim_num]; ene->hit_p[6] = &hit2_1_p[anim_num];
  296.         ene->hit_s[3] = &hit1_0_s[anim_num]; ene->hit_s[4] = &hit1_1_s[anim_num];
  297.         ene->hit_s[5] = &hit2_0_s[anim_num]; ene->hit_s[6] = &hit2_1_s[anim_num];
  298.         if( anim_num == 4){
  299.             SetSE(SE_TRANSFORM);    /* ガチャン */
  300.             ene->work++;
  301.         }
  302.         break;
  303.     case 5:        /* 時間稼ぎ */
  304.         if( !Wait( ene, 60 ) ){
  305.             if( ene->count==20 ){
  306.                 ESHOT    *eshot1,*eshot2;
  307.                 /* レーザー+エネルギー弾 */
  308.                 eshot1=MakeEShot(ESHOT_LASER01, ENE_X, ENE_Y, 5, 128, 4,0,ene);
  309.                 eshot2=MakeEShot(ESHOT_LASER01, ENE_X, ENE_Y, 5, 128, 4,0,ene);
  310.                 eshot1->box_x=-24-16;eshot1->box_y=-46-16;
  311.                 eshot2->box_x=-24-16;eshot2->box_y=45-16;
  312.                 MakeEShot(ESHOT_ENG03, ENE_X, ENE_Y, 5, angle=calc_direction( ENE_X, ENE_Y, P_X+CENTER_X, P_Y ), 4,0,ene);
  313.                 MakeEShot(ESHOT_ENG03, ENE_X, ENE_Y, 5, (angle-12)&255, 4,0,ene);
  314.                 MakeEShot(ESHOT_ENG03, ENE_X, ENE_Y, 5, (angle+12)&255, 4,0,ene);
  315.                 if(level>=NOMAL){
  316.                     MakeEShot(ESHOT_ENG03, ENE_X, ENE_Y, 5, (angle-24)&255, 4,0,ene);
  317.                     MakeEShot(ESHOT_ENG03, ENE_X, ENE_Y, 5, (angle+24)&255, 4,0,ene);
  318.                 }
  319.                 SetSE(SE_LASER01);    /* 敵ショット音 */
  320.             }
  321.         }else{
  322.             ene->work++;
  323.             SetSE(SE_ESHOT_SYURIKEN);    /* 次のショット音 */
  324.         }
  325.         break;
  326.     case 6:
  327.         /* 手裏剣 */
  328.         MakeEShot(ESHOT_SYURIKEN, ENE_X, ENE_Y, 5, ene->angle, 4,0,ene);
  329.         if(level>=HARD)
  330.             MakeEShot(ESHOT_RING01, ENE_X, ENE_Y, 8, (ene->angle+8)&255, 4,0,ene);
  331.         if( (ene->angle+=16)>255 ){
  332.             ene->angle=0;
  333.             ene->work++;
  334.         }
  335.         break;
  336.     case 7:        /* 時間稼ぎ */
  337.         if( Wait( ene, 20 ) )ene->work++;
  338.         break;
  339.     case 8:        /* 腕を閉じる */
  340.         anim_num=(--ene->anim_count)/4;
  341.         ene->pt = obj_boss1+anim_num;
  342.         if( !ene->parts1->child_death )ene->parts1->pt=obj_obj+anim_num;
  343.         if( !ene->parts2->child_death )ene->parts2->pt=obj_obj+anim_num;
  344.         if( !ene->parts3->child_death )ene->parts3->pt=obj_obj+anim_num;
  345.         ene->hit_p[3] = &hit1_0_p[anim_num]; ene->hit_p[4] = &hit1_1_p[anim_num];
  346.         ene->hit_p[5] = &hit2_0_p[anim_num]; ene->hit_p[6] = &hit2_1_p[anim_num];
  347.         ene->hit_s[3] = &hit1_0_s[anim_num]; ene->hit_s[4] = &hit1_1_s[anim_num];
  348.         ene->hit_s[5] = &hit2_0_s[anim_num]; ene->hit_s[6] = &hit2_1_s[anim_num];
  349.         if( anim_num == 0 ){
  350.             SetSE(SE_TRANSFORM);    /* ガチャン */
  351.             ene->anim_count=0;
  352.             ene->work=1;
  353.         }
  354.         break;
  355.     }
  356. #if 0
  357.             ene->lx = 192*65536;
  358.             ene->ly = 192*65536;
  359.             ene->vx = 0;
  360.             ene->vy = 0;
  361.             if( BITSNS(0x04) & BIT(1) ){
  362.                 while( BITSNS(0x04) & BIT(1) );
  363.                 entry_counter_stop = 0;
  364.                 return (0);
  365.             }
  366. #endif
  367.  
  368.     /* コアが全部破壊された時の処理 */
  369.     if( ene->parts1->child_death && ene->parts2->child_death && ene->parts3->child_death ){
  370.         MakeEffect(EFFECT_EXPLL, 0, ene->x, ene->y);
  371.         SetSE(SE_EXPL_BOSS);    /* 爆発音 */
  372.         MakeEffect (EFFECT_HAHEN, 0, ene->x, ene->y);
  373.         if(!eshot_erase)
  374.             eshot_erase = ESHOT_ERASE;        /* 弾消し */
  375.         ene->player->score += 10;
  376.         ene->parts1->child_kill=1;
  377.         ene->parts2->child_kill=1;
  378.         ene->parts3->child_kill=1;
  379.         ene->hit_p[0]=NULL;
  380.         ene->dead_count=1;
  381.     }
  382.  
  383.     xobj_set_st(ene);
  384.     xsp_set_st(ene->parts1);xsp_set_st(ene->parts1->child);
  385.     xsp_set_st(ene->parts2);xsp_set_st(ene->parts2->child);
  386.     xsp_set_st(ene->parts3);xsp_set_st(ene->parts3->child);
  387.  
  388.     return(1);
  389. }
  390.  
  391. static short MoveEnemyCore1( ENEMY *ene )
  392. {
  393.     if( ene->child_death ){
  394.         if( ene->child_kill ){
  395.             ene->child->child_kill=1;
  396.             return (0);        /* 消去 */
  397.         }else
  398.             return(1);
  399.     }
  400.  
  401.     /* ダメージを受けた時の処理 */
  402.     if( ene->damage && ene->pt == obj_obj+4 && ene->child->child_death ){
  403.         SetSE(SE_CORE_DAMAGE);    /* 効果音 */
  404.         ene->info = PALET_DAMAGE | PRIORITY_BOSS_PARTS;
  405.         if((ene->hp -= ene->damage) <= 0) {
  406.             MakeEffect(EFFECT_EXPLMINI, 0, ene->x, ene->y);
  407.             SetSE(SE_EXPL_MBOSS);    /* 爆発音 */
  408.             if(!eshot_erase)
  409.                 eshot_erase = ESHOT_ERASE;        /* 弾消し */
  410.             ene->player->score += 5;
  411.             ene->child_death = 1;
  412.             ene->pt=obj_moji;            /* 見えなくする */
  413.             ene->hit_p[0]=NULL;
  414.         }
  415.     }else
  416.         ene->info = PALET_MAIN | PRIORITY_BOSS_PARTS;
  417.     ene->damage = 0;
  418.  
  419.     return(1);
  420. }
  421.  
  422. static short MoveEnemyCore2( ENEMY *ene )
  423. {
  424.     if( ene->child_death ){
  425.         if( ene->child_kill )
  426.             return (0);        /* 消去 */
  427.         return(1);
  428.     }
  429.  
  430.     /* ダメージを受けた時の処理 */
  431.     if( ene->damage && ene->pt == obj_obj+4 ){
  432.         SetSE(SE_CORE_DAMAGE);    /* 効果音 */
  433.         ene->info &= 0xFF;
  434.         ene->info |= PALET_DAMAGE;
  435.         if((ene->hp -= ene->damage) <= 0) {
  436.             MakeEffect(EFFECT_EXPLMINI, 0, ene->x, ene->y);
  437.             SetSE(SE_EXPL_MBOSS);    /* 爆発音 */
  438.             if(!eshot_erase)
  439.                 eshot_erase = ESHOT_ERASE;        /* 弾消し */
  440.             ene->player->score += 5;
  441.             ene->child_death = 1;
  442.             ene->pt = obj_obj+0xA;            /* 見えなくする */
  443.             ene->info = PALET_MAIN | PRIORITY_BOSS_PARTS;
  444.             ene->hit_p[0]=NULL;
  445.         }
  446.     }else{
  447.         ene->info &= 0xFF;
  448.         ene->info |= PALET_MAIN;
  449.     }
  450.     ene->damage = 0;
  451.  
  452.     return(1);
  453. }
  454.  
  455. static short MoveEnemyCore4( ENEMY *ene )
  456. {
  457.     if( ene->child_death ){
  458.         if( ene->child_kill ){
  459.             ene->parts1->child_kill=1;
  460.             ene->parts2->child_kill=1;
  461.             return (0);        /* 消去 */
  462.         }else
  463.             return(1);
  464.     }
  465.  
  466.     /* ダメージを受けた時の処理 */
  467.     /* 両側のシールドが壊されて、コアが開いているとき */
  468.     if( ene->damage && ene->pt == obj_obj+4 && ene->parts1->child_death && ene->parts2->child_death ){
  469.         SetSE(SE_CORE_DAMAGE);    /* 効果音 */
  470.         ene->info = PALET_DAMAGE | PRIORITY_BOSS_PARTS;
  471.         if((ene->hp -= ene->damage) <= 0) {
  472.             MakeEffect(EFFECT_EXPLMINI, 0, ene->x, ene->y);
  473.             SetSE(SE_EXPL_MBOSS);    /* 爆発音 */
  474.             if(!eshot_erase)
  475.                 eshot_erase = ESHOT_ERASE;        /* 弾消し */
  476.             ene->player->score += 5;
  477.             ene->child_death = 1;
  478.             ene->pt=obj_moji;            /* 見えなくする */
  479.             ene->hit_p[0]=NULL;
  480.         }
  481.     }else
  482.         ene->info = PALET_MAIN | PRIORITY_BOSS_PARTS;
  483.     ene->damage = 0;
  484.  
  485.     return(1);
  486. }
  487.  
  488. static short MoveEnemyShield( ENEMY *ene )
  489. {
  490.     HIT_XY4    *hit_p[2][5]={
  491.         &hit_shield0_p[0],&hit_shield0_p[1],&hit_shield0_p[2],&hit_shield0_p[3],&hit_shield0_p[4],
  492.         &hit_shield1_p[0],&hit_shield1_p[1],&hit_shield1_p[2],&hit_shield1_p[3],&hit_shield1_p[4],
  493.     };
  494.     HIT_XY4    *hit_o[2][5]={
  495.         &hit_shield0_o[0],&hit_shield0_o[1],&hit_shield0_o[2],&hit_shield0_o[3],&hit_shield0_o[4],
  496.         &hit_shield1_o[0],&hit_shield1_o[1],&hit_shield1_o[2],&hit_shield1_o[3],&hit_shield1_o[4],
  497.     };
  498.     HIT_XY4    *hit_s[2][5]={
  499.         &hit_shield0_s[0],&hit_shield0_s[1],&hit_shield0_s[2],&hit_shield0_s[3],&hit_shield0_s[4],
  500.         &hit_shield1_s[0],&hit_shield1_s[1],&hit_shield1_s[2],&hit_shield1_s[3],&hit_shield1_s[4],
  501.     };
  502.     short    info[2]={0x0000, 0x4000};
  503.  
  504.     if( ene->child_kill )
  505.         return (0);        /* 消去 */
  506.  
  507.     /* ダメージを受けた時の処理 */
  508.     if(ene->damage){
  509.         SetSE(SE_SHIELD_DAMAGE);    /* 効果音 */
  510.         ene->info = PALET_DAMAGE | PRIORITY_BOSS_PARTS | info[ene->arg];
  511.         if( (ene->hp -= ene->damage) <= 0 ){
  512.             MakeEffect(EFFECT_EXPLMINI, 0, ene->x, ene->y);
  513.             SetSE(SE_EXPL_MBOSS);    /* 爆発音 */
  514.             ene->player->score += 2;
  515.             ene->child_death = 1;
  516.             ene->hit_p[0]=NULL;
  517.         }
  518.         ene->damage = 0;
  519.     }else
  520.         ene->info = PALET_MAIN | PRIORITY_BOSS_PARTS | info[ene->arg];
  521.  
  522.     if(ene->hp <= 0){
  523.         ene->pt = obj_moji;            /* 見えなくする */
  524.     }else if(ene->hp <= 40){
  525.         ene->pt = obj_obj+9;
  526.         ene->hit_p[0] = hit_p[ene->arg][4];
  527.         ene->hit_o[0] = hit_o[ene->arg][4];
  528.         ene->hit_s[0] = hit_s[ene->arg][4];
  529.     }else if(ene->hp <= 80){
  530.         ene->pt = obj_obj+8;
  531.         ene->hit_p[0] = hit_p[ene->arg][3];
  532.         ene->hit_o[0] = hit_o[ene->arg][3];
  533.         ene->hit_s[0] = hit_s[ene->arg][3];
  534.     }else if(ene->hp <=120){
  535.         ene->pt = obj_obj+7;
  536.         ene->hit_p[0] = hit_p[ene->arg][2];
  537.         ene->hit_o[0] = hit_o[ene->arg][2];
  538.         ene->hit_s[0] = hit_s[ene->arg][2];
  539.     }else if(ene->hp <=160){
  540.         ene->pt = obj_obj+6;
  541.         ene->hit_p[0] = hit_p[ene->arg][1];
  542.         ene->hit_o[0] = hit_o[ene->arg][1];
  543.         ene->hit_s[0] = hit_s[ene->arg][1];
  544.     }
  545.  
  546. /*    xsp_set_st(ene);*/
  547.  
  548.     return(1);
  549. }
  550.  
  551.  
  552. /*
  553. static void TiniEnemyBoss01(ENEMY * p)
  554. {
  555. }
  556. */
  557.